<div class="row">
    <div class="col-lg-12">
        <h3 class="page-header">Thêm khu vực</h3>
    </div>
    <!-- /.col-lg-12 -->
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6">
                        <form role="form" method="POST" name="AddArea" onsubmit="return checkinput();">
                            <div class="form-group">
                                <div class="row">
                                    <div class="col-lg-3">
                                        <label>Tên khu vực</label>
                                    </div>
                                    <div class="col-lg-6">
                                        <input class="form-control" name="name_area" id="name_district" value="<?php echo $this->item->getName(); ?>">
                                    </div>
                                </div>
                            </div>
                                                                      
                            <div class="form-group">
                                <div class="row">
                                <div class="col-lg-3">
                                    <label>Thứ tự</label>
                                </div>
                                <div class="col-lg-6">
                                    <input class="form-control" name="order_area" id="order_district" value="<?php echo $this->item->getOrder(); ?>">
                                </div>
                                </div>
                            </div>
                             <div class="form-group">
                                <div class="row">
                                <div class="col-lg-3">
                                    <label>Hiển thị</label>
                                </div>
                                <div class="col-lg-6">
                                    <input type="checkbox" name="status_area" id="status_district" value="1" 
                                        <?php echo ($this->item->getStatus() == 1 ? "checked=\"checked\"" : "") ?> >
                                </div>
                                </div>
                            </div>
                            <input id="selectionlog" style="display: none" name="selectionlog" />
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary">Thêm mới</button>
                                <button type="reset" class="btn btn-default">Đặt lại</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>   
</div>
<script type="text/javascript">
    document.forms['AddArea'].name.focus();
    function set_focus() {
        document.forms['AddArea'].name.focus();
    }
    function checkinput() {
        var frm = window.document.AddDistrict;
        if (frm.name_area.value == "") {
            bootbox.alert("Vui lòng nhập tên khu vực");
            return false;
        }        
        return true;
    }
</script>
